<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            color: #e0f7fa;
            display: flex;
            flex-direction: column;
            align-items: center;
            min-height: 100vh;
            padding: 40px 20px;
        }

        h1 {
            font-size: 2.5rem;
            margin-bottom: 20px;
            color: #00f7ff;
            text-shadow: 0 0 12px #00f7ff;
        }

        nav {
            margin-bottom: 20px;
        }

        nav a {
            margin: 0 10px;
            padding: 10px 20px;
            background: linear-gradient(90deg, #00f7ff, #01c8ff);
            color: #001f29;
            text-decoration: none;
            font-weight: bold;
            border-radius: 6px;
            transition: transform 0.2s, box-shadow 0.3s;
        }

        nav a:hover {
            transform: scale(1.06);
            box-shadow: 0 0 12px #00f7ff;
        }

        p a {
            background: #00f7ff;
            color: #001f29;
            padding: 8px 16px;
            border-radius: 6px;
            text-decoration: none;
            font-weight: bold;
            box-shadow: 0 0 8px #00f7ff;
            transition: 0.3s ease;
        }

        p a:hover {
            background: #01c8ff;
            box-shadow: 0 0 12px #00f7ff;
        }

        table {
            width: 100%;
            max-width: 960px;
            border-collapse: collapse;
            background: rgba(255, 255, 255, 0.05);
            box-shadow: 0 0 12px rgba(0, 247, 255, 0.1);
            border-radius: 12px;
            overflow: hidden;
        }

        th, td {
            padding: 16px;
            text-align: center;
        }

        th {
            background-color: #012b3c;
            color: #00f7ff;
        }

        tr:nth-child(even) {
            background-color: rgba(255, 255, 255, 0.02);
        }

        tr:hover {
            background-color: rgba(0, 247, 255, 0.05);
        }

        a {
            color: #00f7ff;
            text-decoration: none;
        }

        a:hover {
            text-decoration: underline;
            color: #01c8ff;
        }
    </style>
</head>
<body>
    <h1>用户列表</h1>
    <nav>
        <a href="/">首页</a>
        <a href="/users">用户管理</a>
    </nav>
    <p><a href="/users/add">添加新用户</a></p>
    <table>
        <tr><th>ID</th><th>姓名</th><th>邮箱</th><th>电话</th><th>操作</th></tr>
        {{range .Users}}
        <tr>
            <td>{{.ID}}</td>
            <td>{{.Name}}</td>
            <td>{{.Email}}</td>
            <td>{{.Phone}}</td>
            <td>
                <a href="/users/edit/{{.ID}}">编辑</a> |
                <a href="/users/delete/{{.ID}}" onclick="return confirm('确定删除？')">删除</a>
            </td>
        </tr>
        {{else}}
        <tr><td colspan="5">暂无数据</td></tr>
        {{end}}
    </table>
</body>
</html>
